# 9.1 创建和使用类
class Dog():
    def __init__(self, name, age):
        self.name = name
        self.age = age

    def sit(self):
        print(self.name.title() + "is sit")

    def roll_over(self):
        print(self.name.title() + " rolled over!")


mydog = Dog('dabai', 1)
print(mydog.name)
print(str(mydog.age))
mydog.sit()
mydog.roll_over()
